<?php

class QuestionsController extends AppController
{
    var $name = 'Questions';

	function getNotDealt()
    {
		$this->checkSession();
        return $this->Question->findAll("dealt=0");
    }

	function view($id = null)
    {
		$this->checkSession();
		$this->set('question', $this->Question->find("Question.id=$id"));
    }

	function viewAll()
    {
		$this->checkSession();
		$this->set('allQuestions', $this->Question->findAll(""));
    }
}

?>
